Adding Time and Intervals to Procedural and Hierarchical Control Specifications

نویسندگان

  • Tran Cao Son
  • Chitta Baral
  • Le-Chi Tuan
چکیده

In this paper we introduce the language Golog+HTN for specifying control using procedural and HTN-based constructs together with deadlines and time restrictions. Our language starts with features from GOLOG and HTN and extends them so that we can deal with actions with duration by being able to specify time intervals between the start (or end) of an action (or a program) and the start (or end) of another action (or program). We then discuss an off-line interpreter based on the answer set planning paradigm such that the answer sets of the logic program have a one to one correspondence with the traces of the Golog+HTN specification. Introduction and Motivation GOLOG (Levesque et al. 1997) is an Algol-like logic programming language for agent programming, control, and execution. It is based on the situation calculus theory of actions (Reiter 2000). GOLOG has been primarily used as a programming language for high-level agent control in dynamical environments (see e.g. (Burgard et al. 1998)). Some of the ways GOLOG can be extended are: (a) adding new program constructs (and providing the semantics for these constructs thereafter); or (b) adapting the language to an extension of situation calculus; or (c) combining (a) and (b). The first approach to extending GOLOG has been taken by (De Giacomo, Lespérance, & Levesque 2000; Baral & Son 1999) where various new constructs such as concurrency, interrupts, prioritized interrupts, or partial ordering are added to GOLOG. The other approaches can be seen in (Reiter 2001; Grosskreutz & Lakemeyer 2000; Boutilier et al. 2000) where continuous changes, durative actions, or stochastic actions are considered. In these extensions, time instances are introduced for specifying when an action (or a program) should be executed; in (Grosskreutz & Lakemeyer 2000), it is argued that the explicit specification of time in GOLOG programs – similar to what is used in (Reiter 2001) (also in (Boutilier et al. 2000)) – is not adequate for specifying event-driven behaviors and cc-Golog is proposed to address this problem. However, none of the constructs in cc-Golog allows us to express a simple behav∗Supported by NSF grants EIA-0130887, EIA-0220590. NSF grant 0070463, and NASA grant NCC2-1232. Copyright c © 2004, American Association for Artificial Intelligence (www.aaai.org). All rights reserved. ior like “action a should start its execution within 3 units of time after action b starts its execution” because the language forces actions to happen as soon as possible, which – given that both a and b are executable at the time 0 – will not allow us to consider “a starts at 0 and b starts at 1” as an acceptable trajectory even though it satisfies the stated constraint. In this paper, we investigate the introduction of actions with duration into the framework proposed in (Son, Baral, & McIlraith 2001) in which not only GOLOG-constructs such as sequence, while-loop, if-then-else, etc. but also HTN-based constructs such as the partial ordering and temporal constraints are allowed. This leads to a language1, called Golog+HTN , that generalizes GOLOG-based and HTN-based specifications with time intervals. Our language differs from the extensions of GOLOG in (Reiter 2001; Grosskreutz & Lakemeyer 2000; Boutilier et al. 2000) in that it includes different HTN-based constructs such as partial ordering and temporal constraints. Like cc-Golog, it does not require the explicit specification of time. To characterize Golog+HTN we need an action theory that allows actions to have durations. For that we chose a simple extension of the language A (Gelfond & Lifschitz 1998), which we will refer to as AD. We give the semantics ofAD using logic programming with answer sets semantics. This (the semantics ofAD) allows us to define the notion of a trajectory which we use to define the notion of a trace of a Golog+HTN specification. We will begin with a short review of the answer set semantics of logic programs. We then present the language AD and discuss answer set planning with AD domains. We define the language Golog+HTN and develop a logic programming based interpreter for it. Finally, we conclude with a brief discussion about future work. Logic Programs and Answer Set Semantics A logic program is a collection of rules of the form: a0 ← a1, . . . , am, not am+1, . . . , not an or (1) ← a1, . . . , am, not am+1, . . . , not an (2) where each of the ai’s is a literal in the sense of classical logic. not is the negation-as-failure connective. not a is called a naf-literal. Intuitively, the first rule means that if a1, . . . , am are true and am+1, . . . , an can be safely assumed to be false then a0 must be true. The second rule is The superscript TI refers to time and intervals. a constraint that requires that at least one of a1, . . . , am is false or one of am+1, . . . , an is true. The body of a rule (1) or (2) is satisfied by a set of literals X if {a1, . . . , am}⊆X and {am+1, . . . , an}∩X=∅. A rule of the form (1) is satisfied by X if either its body is not satisfied by X or a0∈X . A rule of the form (2) is satisfied by X if its body is not satisfied by X . For a set of literals X and a program P , the reduct of P with respect to X , denoted by P , is the program obtained from the set of all ground instances of P by deleting (1.) each rule that has a naf-literal not l in its body with l ∈ X , and (2.) all naf-literals in the bodies of the remaining rules. Answer sets of logic programs are first defined by Gelfond and Lifschitz in (Gelfond & Lifschitz 1990). S is an answer set of P if it satisfies the following conditions. 1. If P does not contain any naf-literal (i.e. m = n in every rule of P ) then S is a minimal set of literals that satisfies all the rules in P . 2. If the program P does contain some naf-literal (m < n in some rule of P ), then S is an answer set of P if S is an answer set of P . (Note that P does not contain naf-literals, its answer set is defined in the first item.) In what follows, we will refer to logic programming with answer set semantics as AnsProlog. Answer sets of propositional programs can be computed using answer set solvers such as smodels (Simons, Niemelä, & Soininen 2002), dlv (Eiter et al. 1998), cmodels (Lierler & Maratea 2003), or ASSAT (Lin & Zhao 2002). Answer set planning (ASP) (Subrahmanian & Zaniolo 1995; Lifschitz 2002) is an approach to planning using AnsProlog, an application of answer set programming (Marek & Truszczyński 1999; Niemelä 1999) to planning. In this approach, a planning problem is translated into a logic program whose answer sets correspond one-to-one to the solutions of the original problem. To make answer set programming easier, several new types of rules have been introduced. In this paper, we will often make use of cardinality constraints of the form: l{b1, . . . , bk}u ← a1, . . . , am, not am+1, . . . , not an where ai and bj are literals and l and u are two integers, and l ≤ u. Intuitively, such a rule enforces the constraint that if the body is true then at least l and at most u literals from the head are also true. Answer sets of programs with cardinality constraints are defined in (Simons, Niemelä, & Soininen 2002). Reasoning About Durative Actions Using LP As we mentioned earlier, to characterize domain constraints, we need to first describe an action description language. The action description language that we plan to use is a simple extension of the language A (Gelfond & Lifschitz 1998). In our extension, which we will refer to as AD, we will allow actions to have duration and this will be sufficient to help us to justify and illustrate our language for domain constraints with new connectives. Syntax of AD An action theory consists of two finite, disjoint sets of names A and F, called actions and fluents, respectively, and a set of propositions of the following form: (3) causes(a, f) initially(f) (5) (4) executable(a, {p1, . . . , pn}) duration(a, v) (6) where f and pi’s are fluent literals (a fluent literal is either a fluent g or its negation ¬g) and a is an action. (3) is called a dynamic causal law and represents the effect of a while (4) states an executability condition of a. Intuitively, a proposition of the form (3) states that f is guaranteed to be true after the execution of a. An executability condition of a says that a is executable in a state in which p1, . . . , pn hold. Propositions of the form (5) are used to describe the initial state. It states that f holds in the initial state. Finally, a proposition of the form (6) is used to say that duration of action a is v. An action theory is a set of propositions of the form (3)(6). We will assume that each action a appears in one and only one proposition of the form (6) and v is a non-negative integer expression. We will often conveniently write d(a) to denote the value v if duration(a, v) ∈ D and for a set of actions A, d(A) = max{d(a) | a ∈ A}. Example 1 Consider an action theory with the set of fluents {f, g, h}, the set of actions {a, b, c, d}, and the following propositions: causes(a, f) duration(a, 3) executable(a, {g, h}) causes(b, h) duration(b, 2) executable(b, {}) causes(c, g) duration(c, 2) executable(c, {}) causes(d,¬g) duration(d, 1) executable(d, {}) initially(¬f) initially(¬g) initially(¬h) The propositions about a (the first three propositions on the first line) say that a will cause the fluent f to be true after 3 units of time and is executable only if g and h are true. The propositions for other actions have similar meaning. Since the characterization of AD is not the aim of this paper, we do not present an independent characterization of it. (Recall that our goal is to useAD to show how to plan using a proposed domain constraint language Golog+HTN .) Instead we give a AnsProlog encoding of prediction and planning using AD. Moreover, a transition function based semantics for AD can be defined similarly to what has been done for the language ADC in (Baral, Son, & Tuan 2002). It is worth noticing that the definitions defined herein can be easily adapted to more complex action description language such as ADC. Semantics: Prediction in AD Given a set of propositions D we construct a logic program πD for reasoning about the effects of actions in D. The main predicates in πD are: • h(f, t) – fluent literal f holds at the time t; • exec(a, t) (resp. in exec(a, t)) – action a is executable (resp. in its execution) at t; • init(a, t) (resp. ends(a, t)) – action a starts (resp. ends) its execution at t; The rules of πD are given next. • For each proposition (5) in D, πD contains the following rule: h(f, 1). (7) This describes the initial state (which fluents hold at time point 1) as specified by propositions of the from (5) in D. • For each proposition (4) in D, πD contains the rules: exec(a, T ) ← not not exec(a, T ). not exec(a, T ) ← not h(p1, T ). . . . not exec(a, T ) ← not h(pn, T ). (8) These rules define when a is executable at a time point T , based only on the truth of fluents. These rules establish that a is executable if its executability condition holds. • For each proposition (6) in D, we add the following rules to πD, ends(a, T + v) ← init(a, T ). in exec(a, T ) ← init(a, T ′), T ′≤T j, i.e., p contains an overlapping of two instantiations of a same actions. p is said to be nonconcurrent if it is not a concurrent plan. Generating Action Occurrences. The following rules enumerate action initiations. To decrease the number of answer sets we have made the assumption that two action instantiations corresponding to the same action can not overlap each other, i.e., we consider only non-concurrent plans. This need not be the case in general. Our point here is that AnsProlog allows us to express such restrictions very easily. For each action a with the duration v, the rules: act(a, T )←init(a, T1), T1<T<T1+v. ninit(a, T )← not init(a, T ). (14) init(a, T )←exec(a, T ), not act(a, T ), not ninit(a, T ). can be used to prevent two instantiations of a to overlap. The 1 rule defines when a is active and the 3 rule allows a to occur only if it has not been initiated and is not active. For every pair of a and b such that causes(a, f) and causes(b,¬f) belong to D, the two rules: overlap(a, b, T )←in exec(a, T ), in exec(b, T ). ←overlap(a, b, T ). (15) can be used to disallow actions with contradictory effects to overlap. Let π(D,G) be the set of rules of Π(D) with the goal G and plan size=n and the rules (14)-(15). For an answer set M of π(D,G), let si(M) = {f | h(f, i) ∈ M} and Ai(M) = {a | init(a, i) ∈ M}. We can prove that there is an one-to-one correspondence between answer sets of π(D, G) and non-concurrent plans achieving G. Theorem 1 For a theory D and a goal G, B1, . . . , Bn is a non-concurrent plan that achieves G iff there exists an answer set M of π(D, G) s.t. Ai(M)=Bi. Golog+HTN: Using Durations in Procedural and Hierarchical Domain Constraints We begin with an informal discussion on the new construct in Golog+HTN . Consider the domain from Example 1. It is easy to see that the program b; c; a is a program achieving f from any state and the time needed to execute this plan is the sum of the actions’s durations (Figure 1, Case (a)). Observe that b and c are two actions that achieve the condition for a to be executable and can be executed in parallel. Hence it should be obvious that any program that allows b and c to execute in parallel will have a shorter execution time. For the The PV er stands for plan verification. moment, let us represent this by the program p1 = {b, c}; a. The execution of this program is depicted in Figure 1, Case (b). Now consider a modification of the domain in Examp p p p p p p p p p p 0 1 2 3 4 5 6 7 8 9 10 time (a) r b -r c -r a -

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Improved Turbine Engine Hierarchical Modeling and Simulation Based on Engine Fuel Control System

Aircraft engines constitute a comp‌lex system, requiring adequate mon-itoring to ensure flight safety and timely maintenance. The best way to achieve this, is modeling the engine. Therefore, in this paper, a suitable mathematical model from engine controller design point of view, for a specific aero turbine engine is proposed by the aid of MATLAB/Simulink software. The model is capable of reduc...

متن کامل

رابطه عدالت سازمانی ادراک شده با رفتارهای تلافی جویانه با توجه به نقش باورهای جبران عدالت

This research was conducted with the aim of investigating the moderator role of justice compensation in relationship between perceived organizational justices and employees’ retaliatory behaviors. Research statistical population was the male's personnel of an industrial – productive complex in Isfahan City. 275 persons of them were selected from personnel’s' names list using systematic random s...

متن کامل

رابطه عدالت توزیعی، رویه‌ای و همانندسازی سازمانی با همکاری در معلمان

Abstract This research was administered with the aim of investigating the relationship between distributive and procedural justice and organizational identification with cooperation among teachers in the City of Esfahan 389 teachers (112 men and 277 women) were selected from the population. Research instruments were: Distributive Justice Questionnaire (DJQ), Procedural Justice Questionnaire (P...

متن کامل

Bayesian change point estimation in Poisson-based control charts

Precise identification of the time when a process has changed enables process engineers to search for a potential special cause more effectively. In this paper, we develop change point estimation methods for a Poisson process in a Bayesian framework. We apply Bayesian hierarchical models to formulate the change point where there exists a step < /div> change, a linear trend and a known multip...

متن کامل

Trajectory tracking of under-actuated nonlinear dynamic robots: Adaptive fuzzy hierarchical terminal sliding-mode control

In recent years, underactuated nonlinear dynamic systems trajectory tracking, such as space robots and manipulators with structural flexibility, has become a major field of interest due to the complexity and high computational load of these systems. Hierarchical sliding mode control has been investigated recently for these systems; however, the instability phenomena will possibly occur, especia...

متن کامل

Assessing log extraction related soil disturbance and solutions to protect soil and reduce disturbance of forest ecosystem.

Skid trails are the main routes for wood extraction and also the main source of runoff and sediment production in Forests. This research was conducted in Kuhmiyan forest of Golestan Province to determine infiltration, compaction, strength (resistance to penetration) and moisture content in three treatment including control (in the forest), wheel ruts and middle of skid trail were measured in th...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004